1. Field of the Invention
The present invention relates to a computer program product, system, and method for using inactive copy relationships to resynchronize data between storages.
2. Description of the Related Art
In a storage environment, a storage controller may maintain mirror copy relationships, where a source volume in a mirror copy relationship comprises the storage or volumes from which data is physically copied to a target volume. Failover programs, such as International Business Machines Corporation's (“IBM”) HyperSwap® which is a function in the z/OS® operating system, provides continuous availability for disk failures by maintaining the mirror copy relationships to provide synchronous copies of source (primary) disk volumes in one or more storage systems to one or more target (secondary) volumes in one or more storage systems. (HyperSwap is a registered trademark of IBM in countries throughout the world). When a disk failure is detected, code in the operating system identifies HyperSwap managed volumes and instead of failing the I/O request, HyperSwap switches (or swaps) information in internal control blocks so that the I/O request is driven against the target volume of the mirror copy relationship. Since the target volume is an identical copy of the source volume prior to the failure, the I/O request will succeed with no impact to the program issuing the I/O request, which could be an application program or part of the operating system. This therefore masks the disk failure from the program and avoids an application and/or system outage.
A mirror copy relationship may maintain a current and previous bitmaps to keep track of updates at the source volume that need to be copied or synchronized to the target storage. A previous bitmap, also known as an out-of-synch bitmap, indicates updated data in the source volume that occurred in a previous interval, or consistency period, and a current bitmap, also known as a change recording bitmap, which indicates updated data in the source volume that occurred in the current interval or current consistency period. After the replication manager copies all updated data indicated in the previous bitmap, the bitmaps would be toggled to create a new interval, so that the previous bitmap is set to the current bitmap to copy all updated data prior to the new interval, and a new current bitmap would be initialized to record writes in the new interval. In this way, updates that occur while data is being synchronized get recorded without interfering with the synchronization of the writes as of the recent interval.
Further, current mirror copy environments allow for the incremental resynchronization between a first and third site in a three site cascaded configuration (e.g., a first storage synchronizes a source volume to a second storage and then the second storage synchronizes to a further third storage in the cascaded configuration). If there is a failure at the second storage, then the source server may perform resynchronization between the first storage and the third storage, so that the final third storage in the cascade is the new target of the synchronization from the first storage. In order to perform the resynchronization, a pair of change recording bitmaps for the synchronization from the first storage to the third storage is used to track the synchronization of the source data from the second storage to the final third storage. These change recording bitmaps are used during resynchronization, also known as an incremental resynchronization recovery operation, to determine data in the third storage that needs to be resynchronized from the source storage.